CFLAGS = -c
LIB = ar -r

all: memory table clean

table: memory
	@$(CC) table.c $(FLAGS) $(CFLAGS) -o libtable.o
	@$(LIB) libtable.a libtable.o
	@ranlib libtable.a
	@echo "(CC) libtable"

memory:
	@$(CC) memory.c $(FLAGS) $(CFLAGS) -o libmemory.o
	@$(LIB) libmemory.a libmemory.o
	@ranlib libmemory.a
	@echo "(CC) libmemory"

clean:
	@find . -regex ".*\.*[o~]" -print |xargs -r rm
